﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace ArgusLight.Fractals2D.ComplexFractalColoring.EscapeTime
{
	public class HSV1 : HSVColoring
	{
		public override Color GetColor(int x, int y)
		{
			if (this.data.iterations[x, y] >= this.fractalParameter.Iterations || this.data.iterations[x,y] < 1)
				return Colors.Black;
			Color c = base.GetColor(x, y);
			return c.FromHSV((int)(this.parameter.Frequency*this.data.iterations[x, y]+this.parameter.Translation*360) % 360, 1, 1);
		}
	}

	//public class HSV2 : HSVColoring
	//{
	//	public override Color GetColor(int x, int y)
	//	{
	//		Color c = new Color();

	//		if (this.data.iterations[x,y] < this.fractalParameter.Iterations)
	//			return c.FromHSV((int)(this.parameter.Frequency * this.data.iterations[x, y] + this.parameter.Translation * 360) % 360, 1, 1);

	//		return c.FromHSV((this.data.z[x, y].Phase * 180 / Math.PI) + 180, 1, 1 - this.data.z[x, y].Magnitude / 2);
	//	}
	//}
}
